/**
 * Generate time : 2011-04-21 6:14:30
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCS01 table comment : 系统模块
 */
public class ZMCSSystemModule extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private Long fdSerialNumber = new Long(0); /* 序号 */
	private String fdModuleNo = " "; /* 模块编号 */
	private String fdModuleName = " "; /* 模块名称 */
	private Long fdModuleLevel = new Long(0); /* 模块级别 */
	private String fdParentId = " "; /* 父级模块ID */
	private String fdParentName = " "; /* 父级模块名称 */
	private String fdNature = " "; /* 模块性质 */
	private String fdType = " "; /* 模块类型 */
	private String fdStatus = " "; /* 状态 */
	private String fdPackage = " "; /* 包路径 */
	private String fdIcon = " "; /* 图标 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSerialNumber");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("序号");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdModuleNo");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("模块编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdModuleName");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("模块名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdModuleLevel");
		eiColumn.setType("C");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("模块级别");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("父级模块ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParentName");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("父级模块名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdNature");
		eiColumn.setFieldLength(6);
		eiColumn.setDescName("模块性质");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdType");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("模块类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPackage");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("包路径");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdIcon");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("图标");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSSystemModule() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdSerialNumber - 序号
	 * 
	 * @return the fdSerialNumber
	 */
	public Long getFdSerialNumber() {
		return this.fdSerialNumber;
	}

	/**
	 * set the fdSerialNumber - 序号
	 */
	public void setFdSerialNumber(Long fdSerialNumber) {
		this.fdSerialNumber = fdSerialNumber;
	}
	
	/**
	 * get the fdModuleNo - 模块编号
	 * 
	 * @return the fdModuleNo
	 */
	public String getFdModuleNo() {
		return this.fdModuleNo;
	}

	/**
	 * set the fdModuleNo - 模块编号
	 */
	public void setFdModuleNo(String fdModuleNo) {
		this.fdModuleNo = fdModuleNo;
	}

	/**
	 * get the fdModuleName - 模块名称
	 * 
	 * @return the fdModuleName
	 */
	public String getFdModuleName() {
		return this.fdModuleName;
	}

	/**
	 * set the fdModuleName - 模块名称
	 */
	public void setFdModuleName(String fdModuleName) {
		this.fdModuleName = fdModuleName;
	}

	/**
	 * get the fdModuleLevel - 模块级别
	 * 
	 * @return the fdModuleLevel
	 */
	public Long getFdModuleLevel() {
		return this.fdModuleLevel;
	}

	/**
	 * set the fdModuleLevel - 模块级别
	 */
	public void setFdModuleLevel(Long fdModuleLevel) {
		this.fdModuleLevel = fdModuleLevel;
	}

	/**
	 * get the fdParentId - 父级模块ID
	 * 
	 * @return the fdParentId
	 */
	public String getFdParentId() {
		return this.fdParentId;
	}

	/**
	 * set the fdParentId - 父级模块ID
	 */
	public void setFdParentId(String fdParentId) {
		this.fdParentId = fdParentId;
	}

	/**
	 * get the fdParentName - 父级模块名称
	 * 
	 * @return the fdParentId
	 */
	public String getFdParentName() {
		return this.fdParentName;
	}

	/**
	 * set the fdParentId - 父级模块名称
	 */
	public void setFdParentName(String fdParentName) {
		this.fdParentName = fdParentName;
	}
	
	/**
	 * get the fdNature - 模块性质
	 * 
	 * @return the fdNature
	 */
	public String getFdNature() {
		return this.fdNature;
	}

	/**
	 * set the fdNature - 模块性质
	 */
	public void setFdNature(String fdNature) {
		this.fdNature = fdNature;
	}

	/**
	 * get the fdType - 模块类型
	 * 
	 * @return the fdType
	 */
	public String getFdType() {
		return this.fdType;
	}

	/**
	 * set the fdType - 模块类型
	 */
	public void setFdType(String fdType) {
		this.fdType = fdType;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdPackage - 包路径
	 * 
	 * @return the fdPackage
	 */
	public String getFdPackage() {
		return this.fdPackage;
	}

	/**
	 * set the fdPackage - 包路径
	 */
	public void setFdPackage(String fdPackage) {
		this.fdPackage = fdPackage;
	}

	/**
	 * get the fdIcon - 图标
	 * 
	 * @return the fdIcon
	 */
	public String getFdIcon() {
		return this.fdIcon;
	}

	/**
	 * set the fdIcon - 图标
	 */
	public void setFdIcon(String fdIcon) {
		this.fdIcon = fdIcon;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSerialNumber(NumberUtils.toLong(StringUtils.toString(map.get("fdSerialNumber")), fdSerialNumber));
		setFdModuleNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModuleNo")), fdModuleNo));
		setFdModuleName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModuleName")), fdModuleName));
		setFdModuleLevel(NumberUtils.toLong(StringUtils.toString(map.get("fdModuleLevel")), fdModuleLevel));
		setFdParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentId")), fdParentId));
		setFdParentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParentName")), fdParentName));
		setFdNature(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNature")), fdNature));
		setFdType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdType")), fdType));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdPackage(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPackage")), fdPackage));
		setFdIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdIcon")), fdIcon));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSerialNumber", StringUtils.toString(fdSerialNumber, eiMetadata.getMeta("fdSerialNumber")));
		map.put("fdModuleNo", StringUtils.toString(fdModuleNo, eiMetadata.getMeta("fdModuleNo")));
		map.put("fdModuleName", StringUtils.toString(fdModuleName, eiMetadata.getMeta("fdModuleName")));
		map.put("fdModuleLevel", StringUtils.toString(fdModuleLevel, eiMetadata.getMeta("fdModuleLevel")));
		map.put("fdParentId", StringUtils.toString(fdParentId, eiMetadata.getMeta("fdParentId")));
		map.put("fdParentName", StringUtils.toString(fdParentName, eiMetadata.getMeta("fdParentName")));
		map.put("fdNature", StringUtils.toString(fdNature, eiMetadata.getMeta("fdNature")));
		map.put("fdType", StringUtils.toString(fdType, eiMetadata.getMeta("fdType")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdPackage", StringUtils.toString(fdPackage, eiMetadata.getMeta("fdPackage")));
		map.put("fdIcon", StringUtils.toString(fdIcon, eiMetadata.getMeta("fdIcon")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}